<?php
namespace Hong\Webdav;

trait TraitDelete
{
    /**
	 * 删除服务器上的文件
	 * @return true
	 * @throws \RuntimeException 当请求失败时抛出异常
	 */
	public function delete($remotePath, $headers=[])
	{

		$response = $this->sendRequest('DELETE', $remotePath, null, $headers);

		if ($response['status'] !== 200) {
			return false;
		}

		return true;
	}
}